<template>
	<view class="container">
		<view class="card">
			<view class="name">计划详情</view>
			<view class="item flex-row">
				<view class="label">演练时间：</view>
				<text>{{ form.time || '' }}</text>
			</view>
			<view class="item flex-row">
				<view class="label">演练地点：</view>
				<text>{{ form.place || '' }}</text>
			</view>
			<view class="item flex-row">
				<view class="label">参与部门：</view>
				<text>{{ form.deptids || '' }}</text>
			</view>
			<view class="item flex-row">
				<view class="label">状态：</view>
				<text v-if="form.is_yl" style="color: #33CC00;">已演练</text>
				<text v-else style="color: #F98202;">未演练</text>
			</view>
			<view class="item flex-row">
				<view class="label">脚本：</view>
				<view @click="toDrill"><text style="color: #157FC2;">{{ form.file_name || '' }}</text>(点击查看)</view>
			</view>
		</view>
	</view>
</template>

<script>
export default{
	data(){
		return {
			form: {}
		}
	},
	onLoad(){
		this.form = uni.getStorageSync('emergencyDrillDetail') || {};
		uni.setNavigationBarTitle({
			title: this.form.name || '演练详情'
		})
	},
	onBackPress(){
		uni.removeStorageSync('emergencyMaterialDetail');
	},
	methods: {
		toDrill(){
			uni.navigateTo({
				url: '../../jump?src='+encodeURIComponent(this.form.file_url)
			})
		}
	}
}
</script>

<style scoped>
.container{
	height: 100vh;
	overflow-y: auto;
}

.flex-row{
	justify-content: flex-start;
}

/*卡片*/
.card{
	background: #fff;
	margin: 20upx;
	border-radius: 16upx;
	padding: 14upx 20upx;
	border: 2upx solid #F6F6F6;
	box-shadow: 0 0 4upx #eee;
	position: relative;
}
.card .title{
	margin-bottom: 20upx;
}
.card .title view{
	height: 42upx;
	font-size: 28upx;
}
.card .item.half view{
	width: 50%;
}
.card .item view{
	font-size: 28upx;
}
.card .item view.label{
	width: 160upx;
}
.card .name{
	font-size: 32upx;
}
</style>
